/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.foxline.clinicplus.entity;

import br.com.foxline.clinicplus.entity.odonto.Odontograma;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.*;

/**
 *
 * @author roniere
 */
@Entity
public class Records implements Serializable{
    
    @Id
    @SequenceGenerator(sequenceName = "seq_records", name = "seq_records", allocationSize = 1)
    @GeneratedValue(generator = "seq_records", strategy = GenerationType.SEQUENCE)
    private Long id;
    
    @ManyToOne
    private Customer customer;
    
    @ManyToOne
    private Procedure procedure;
    
    @OneToMany(cascade= CascadeType.ALL)
    private List<Anamnese> anamneses;
   
    
    @OneToOne(cascade= CascadeType.ALL)
    private PhysicalExamination physicalExamination;
    
    @OneToOne(cascade= CascadeType.ALL)
    private Diagnostic diagnostic;
    
    @OneToMany(cascade= CascadeType.ALL)
    private List<Evolution> evolutions;
    
    private String prescription;
    
    @OneToMany
    private List<Annex> annexs;
    
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Date createAt;
    
    @ManyToOne
    private Doctor doctor;
    
    @ManyToOne
    private Doctor doctorRequest;
    
    @ManyToOne
    private SystemUser systemUser;
    
    /**
     * ODONTOGRAMA
     */
    @OneToOne
    private Odontograma odontograma;

    public Odontograma getOdontograma() {
        return odontograma;
    }

    public void setOdontograma(Odontograma odontograma) {
        this.odontograma = odontograma;
    }
    
    
    public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }
    
    public List<Anamnese> getAnamneses() {
        return anamneses;
    }

    public void setAnamneses(List<Anamnese> anamneses) {
        this.anamneses = anamneses;
    }

    public List<Annex> getAnnexs() {
        return annexs;
    }

    public void setAnnexs(List<Annex> annexs) {
        this.annexs = annexs;
    }

    public Diagnostic getDiagnostic() {
        return diagnostic;
    }

    public void setDiagnostic(Diagnostic diagnostic) {
        this.diagnostic = diagnostic;
    }

    public List<Evolution> getEvolutions() {
        return evolutions;
    }

    public void setEvolutions(List<Evolution> evolutions) {
        this.evolutions = evolutions;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public PhysicalExamination getPhysicalExamination() {
        return physicalExamination;
    }

    public void setPhysicalExamination(PhysicalExamination physicalExamination) {
        this.physicalExamination = physicalExamination;
    }

    public String getPrescription() {
        return prescription;
    }

    public void setPrescription(String prescription) {
        this.prescription = prescription;
    }

    public Procedure getProcedure() {
        return procedure;
    }

    public void setProcedure(Procedure procedure) {
        this.procedure = procedure;
    }

    
    public Date getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

    public Doctor getDoctor() {
        return doctor;
    }

    public void setDoctor(Doctor doctor) {
        this.doctor = doctor;
    }

    public SystemUser getSystemUser() {
        return systemUser;
    }

    public void setSystemUser(SystemUser systemUser) {
        this.systemUser = systemUser;
    }

    public Doctor getDoctorRequest() {
        return doctorRequest;
    }

    public void setDoctorRequest(Doctor doctorRequest) {
        this.doctorRequest = doctorRequest;
    }
    
    @Override
    public String toString() {
        return "Records{" + "id=" + id + ", customer=" + customer + ", anamneses=" + anamneses + ", physicalExamination=" + physicalExamination + ", diagnostic=" + diagnostic + ", evolutions=" + evolutions + ", prescription=" + prescription + ", annexs=" + annexs + ", createAt=" + createAt + ", doctor=" + doctor + ", systemUser=" + systemUser + '}';
    }
    
    
}
